package com.linx.system.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.linx.common.mybatis.core.mapper.BaseMapperPlus;
import com.linx.system.domain.AppMenu;
import com.linx.system.domain.AppRoleMenu;
import com.linx.system.domain.bo.AppRoleMenuBo;
import com.linx.system.domain.vo.AppRoleMenuVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * App角色和菜单关联Mapper接口
 *
 * @author linx
 * @date 2024-12-24
 */
@Repository
public interface AppRoleMenuMapper extends BaseMapperPlus<AppRoleMenu, AppRoleMenuVo> {

    Page<AppRoleMenuVo> selectAllocatedList(Page<Object> build, AppRoleMenuBo bo);

    List<Long> selectAppMenuIdsByRoleId(Long roleId);



    Page<AppRoleMenuVo> selectUnallocatedList(@Param("page") Page<AppMenu> page,
                                              @Param(Constants.WRAPPER) Wrapper<AppMenu> queryWrapper);


}
